package com.easybacklog.client.cucumberfeatures;

import com.easybacklog.client.InitializeEasyBacklog;
import com.easybacklog.client.cucumberfeatures.edit.BacklogFeatureForm;
import com.easybacklog.client.model.ProjectFeature;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.PopupPanel;

/**
 * 
 * @Feature
 */
public class CreateBacklogFeature extends HTML {

	public static final String imageUnpressed = "<a href='#'><img src='images/add.gif'></a>";

	public PopupPanel addStoryHint;

	public CreateBacklogFeature() {

		this.setHTML(imageUnpressed);

		this.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {

				InitializeEasyBacklog.vpBacklog.clear();
				InitializeEasyBacklog.vpBacklog.add(new BacklogFeatureForm(
						new ProjectFeature()));
			}
		});

		// addStoryHint = HelpHint.getHelpHintLinked("src."
		// + this.getClass().getName(),
		// internationalizationConstants.addNewStory(),
		// GlobalVariables.locale);

		this.addMouseOverHandler(new MouseOverHandler() {

			@Override
			public void onMouseOver(MouseOverEvent event) {

				// HelpHint.executeMouseOverHandler(event, addStoryHint, null);

			}
		});
	}
}
